<?php
    namespace app;
    include_once('autoloader.php');
    use app\HeadComponent;
    echo HeadComponent::render('登录');
?>
<body>
    <div class="container">
        <div class="row mt-5">
            <div class="col-4 offset-4 border border-success p-2">
                <div>
                    <?php
                        if (isset($_GET['login'])) {
                            $login = $_GET['login'];
                            if ($login === 'false') {
                                echo '用户名密码错误';
                            }  
                        }
                    ?>
                </div>
                <form action="login.controller.php" method="POST">
                  <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" class="form-control" id="username" aria-describedby="请输入用户名"
                        name="username">
                    <small class="form-text text-muted">我们对您的输入信息将严格保密</small>
                  </div>
                  <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" class="form-control" id="password" 
                        name="password">
                  </div>
                  <div class="form-group form-check">
                    <input type="checkbox" class="form-check-input" id="remeberPassword">
                    <label class="form-check-label" for="remeberPassword">记住密码</label>
                  </div>
                  <button type="submit" class="btn btn-primary">登录</button>
                </form>
            </div>
        </div>
    </div>
</body>
</html>